home *** CD-ROM | disk | FTP | other *** search
- package sub_arctic.input;
- import sub_arctic.lib.interactor;
- import sub_arctic.lib.menu;
-
- /**
- * This interface is used by interactors which are menus or subclasses
- * of menu. It informs you when:
- *
- * <ul>
- * <li>
- * 1) You receive the "ending" drag of a menu interaction.
- * <li>
- * 2) You receive the "drag" part of a menu interaction on your
- * area.
- * <li>
- * 3) One of your parents received a "drag" interaction on its area,
- * or the mouse was released outside your area,
- * which implies that you have lost the menu focus and should go
- * away.
- * </ul>
- *
- * Be aware: There is are multiple focuses for menus. The trick is
- * that the menu_focus_agent enforces an ordering on the interactors
- * in its set. If an event occurs on a member of the focus set A which
- * was added before another member of the set B, B is removed from the
- * focus set. Thus, if you override focus_set_enter and focus_set_exit
- * you can detect what it is doing. <p>
- *
- * @author Ian Smith
- */
- public interface menu_focusable extends focusable,interactor {
-
- /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
-
- /**
- * This function gets called during the process of the user
- * dragging around on the menu. The menu should probably
- * use pick() to figure out who to highlight based on this
- * event. Like other focus based agents, its hands you back
- * the object you gave it when you put yourself in the focus set.
- *
- * @param event evt event "causing" this action
- * @param Object user_info uninterpreted object that was given at the
- * time focus was established.
- */
- public void menu_feedback(event evt, Object user_info);
-
- /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
-
- /**
- * This function gets called to inform you that the mouse button
- * was released over your menu. Again, we hand you the object
- * you gave use when you added yourself to the focus.
- */
- public void menu_release(event evt, Object user_info);
-
- /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
-
- /**
- * This function is called to tell you your menu has been
- * exited (the pointer is outside your space). Note you
- * may get this without being removed the focus set... the
- * user might come back! Also, you are not guaranteed to
- * get this call; you only get if the user leaves your menu.
- *
- * @param event evt event "causing" this action
- * @param Object user_info uninterpreted object that was given at the
- * time focus was established.
- */
- public void menu_exit(event evt, Object user_info);
-
- /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
-
- /**
- * This function gets called to ask a menu if a point
- * generates a menu, an if so which one. This is
- * useful when dealing with events on a menu, so the
- * agent will know if it needs to pop a menu down.
- *
- * If you get this call it will *only* be called when you have
- * a currently displayed menu as a child. Thus, this is
- * effectively is a check to see if the currently displayed
- * child is the product of this location.
- *
- * The x and y coordinates are transformed to your coordinate system.
- *
- * @param int local_x x coordinate of the point in question.
- * @param int local_y y coordinate of the point in question.
- */
- public menu menu_generates_submenu(int local_x, int local_y);
-
- /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
-
- }
- /*=========================== COPYRIGHT NOTICE ===========================
-
- This file is part of the subArctic user interface toolkit.
-
- Copyright (c) 1996 Scott Hudson and Ian Smith
- All rights reserved.
-
- The subArctic system is freely available for most uses under the terms
- and conditions described in
- http://www.cc.gatech.edu/gvu/ui/sub_arctic/sub_arctic/doc/usage.html
- and appearing in full in the lib/interactor.java source file.
-
- The current release and additional information about this software can be
- found starting at: http://www.cc.gatech.edu/gvu/ui/sub_arctic/
-
- ========================================================================*/
-